#include<iostream>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		if (n == 0) {
			break;
	    }
		int sum = 0;
		int a = 1;
		for (int i = 1; i < n; i++)
		{
			a = (a + 1) * 2;
		}
		cout << a << endl;
	}
	return 0;
}